
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>

<HEAD>
   <TITLE>ekrcec_c</TITLE>
</HEAD>

<BODY style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<A name="TOP"></A>

<table style="text-align: left; margin-left: auto; margin-right: auto; width: 800px;"
 border="0" cellpadding="5" cellspacing="2">
  <tbody>
    <tr>
      <td style="background-color: rgb(153, 153, 153); vertical-align: middle; text-align: center;">
      <div align="right"> 
      <small><small><a href="index.html">Index Page</a></small></small>
      </div>
      <b>ekrcec_c</b> </td>
    </tr>

    <tr>
      <td style="vertical-align: top;">

<small><div align="center">
<A HREF="index.html#A">A</A>&nbsp;
<A HREF="index.html#B">B</A>&nbsp;
<A HREF="index.html#C">C</A>&nbsp;
<A HREF="index.html#D">D</A>&nbsp;
<A HREF="index.html#E">E</A>&nbsp;
<A HREF="index.html#F">F</A>&nbsp;
<A HREF="index.html#G">G</A>&nbsp;
<A HREF="index.html#H">H</A>&nbsp;
<A HREF="index.html#I">I</A>&nbsp;
<A HREF="index.html#J">J</A>&nbsp;
<A HREF="index.html#K">K</A>&nbsp;
<A HREF="index.html#L">L</A>&nbsp;
<A HREF="index.html#M">M</A>&nbsp;
<A HREF="index.html#N">N</A>&nbsp;
<A HREF="index.html#O">O</A>&nbsp;
<A HREF="index.html#P">P</A>&nbsp;
<A HREF="index.html#Q">Q</A>&nbsp;
<A HREF="index.html#R">R</A>&nbsp;
<A HREF="index.html#S">S</A>&nbsp;
<A HREF="index.html#T">T</A>&nbsp;
<A HREF="index.html#U">U</A>&nbsp;
<A HREF="index.html#V">V</A>&nbsp;
<A HREF="index.html#W">W</A>&nbsp;
<A HREF="index.html#X">X</A>&nbsp;
</div></small>
       <br>
       <table style="text-align: left; width: 60%; margin-left: auto; margin-right: auto;"
       border="0" cellspacing="2" cellpadding="2">
        <tbody>
          <tr>
            <td style="width: 50%; text-align: center;">
            <small>
              <a href="#Procedure">Procedure<br></a>
              <a href="#Abstract">Abstract<br></a>
              <a href="#Required_Reading">Required_Reading<br></a>
              <a href="#Keywords">Keywords<br></a>
              <a href="#Brief_I/O">Brief_I/O<br></a>
              <a href="#Detailed_Input">Detailed_Input<br></a>

              </small>
              </td>
              <td style="vertical-align: top; width: 50%; text-align: center;">
              <small>               <a href="#Detailed_Output">Detailed_Output<br></a>
              <a href="#Parameters">Parameters<br></a>
              <a href="#Exceptions">Exceptions<br></a>
              <a href="#Files">Files<br></a>
              <a href="#Particulars">Particulars<br></a>
              <a href="#Examples">Examples<br></a>

              </small>
              </td>
              <td style="vertical-align: top; width: 50%; text-align: center;">
              <small>               <a href="#Restrictions">Restrictions<br></a>
              <a href="#Literature_References">Literature_References<br></a>
              <a href="#Author_and_Institution">Author_and_Institution<br></a>
              <a href="#Version">Version<br></a>
              <a href="#Index_Entries">Index_Entries<br></a>
             </small>
            </td>
          </tr>
        </tbody>
</table>

<h4><a name="Procedure">Procedure</a></h4>
<PRE>
   void ekrcec_c ( SpiceInt           handle,
                   SpiceInt           segno,
                   SpiceInt           recno,
                   ConstSpiceChar   * column,
                   SpiceInt           lenout,
                   SpiceInt         * nvals,
                   void             * cvals,
                   SpiceBoolean     * isnull )

</PRE>
<h4><a name="Abstract">Abstract</a></h4>
<PRE>
 
   Read data from a character column in a specified EK record. 
 </PRE>
<h4><a name="Required_Reading">Required_Reading</a></h4>
<PRE>
 
   <a href="../req/ek.html">EK</a> 
 </PRE>
<h4><a name="Keywords">Keywords</a></h4>
<PRE>
 
   EK 
   FILES 
   UTILITY 
 

</PRE>
<h4><a name="Brief_I/O">Brief_I/O</a></h4>
<PRE>
 
   Variable  I/O  Description 
   --------  ---  -------------------------------------------------- 
   handle     I   Handle attached to EK file. 
   segno      I   Index of segment containing record. 
   recno      I   Record from which data is to be read. 
   column     I   Column name. 
   lenout     I   Maximum length of output strings.
   nvals      O   Number of values in column entry. 
   cvals      O   Character values in column entry. 
   isnull     O   Flag indicating whether column entry is null. 
 </PRE>
<h4><a name="Detailed_Input">Detailed_Input</a></h4>
<PRE>
 
   handle         is an EK file handle.  The file may be open for 
                  read or write access.   
 
   segno          is the index of the segment from which data is to 
                  be read.  The first segment in the file has index 0.
 
   recno          is the index of the record from which data is to be 
                  read.  This record number is relative to the start 
                  of the segment indicated by segno; the first 
                  record in the segment has index 0. 
 
   column         is the name of the column from which data is to be 
                  read. 
 
   lenout         is the maximum string length that can be accommodated in
                  the output array cvals.  This length must large enough to 
                  hold the longest element of the specified column entry, 
                  including a null terminator.  If the column element contains
                  strings of length up to n characters, lenout should be set
                  to n + 1. 
</PRE>
<h4><a name="Detailed_Output">Detailed_Output</a></h4>
<PRE>
 
   nvals, 
   cvals          are, respectively, the number of values found in 
                  the specified column entry and the set of values 
                  themselves.  The array cvals must have sufficient 
                  string length to accommodate the longest string 
                  in the returned column entry. The calling application
                  should declare cvals with dimension

                     [nelts][lenout]
                  
                  where nelts is the maximum number of elements that 
                  occur in any entry of the specified column. 

                  For columns having fixed-size entries, when a  
                  a column entry is null, nvals is still set to the 
                  column entry size.  For columns having variable- 
                  size entries, nvals is set to 1 for null entries. 
 
   isnull         is a logical flag indicating whether the returned  
                  column entry is null.   
 </PRE>
<h4><a name="Parameters">Parameters</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Exceptions">Exceptions</a></h4>
<PRE>
 
   1)  If handle is invalid, the error will be diagnosed by routines 
       called by this routine. 
 
   2)  If segno is out of range, the error will diagnosed by routines 
       called by this routine. 
 
   3)  If recno is out of range, the error will diagnosed by routines 
       called by this routine. 
 
   4)  If column is not the name of a declared column, the error 
       will be diagnosed by routines called by this routine. 
 
   5)  If column specifies a column of whose data type is not 
       character, the error SPICE(WRONGDATATYPE) will be 
       signaled. 
 
   6)  If column specifies a column of whose class is not 
       a character class known to this routine, the error 
       SPICE(NOCLASS) will be signaled. 
 
   7)  If an attempt is made to read an uninitialized column entry, 
       the error will be diagnosed by routines called by this  
       routine.  A null entry is considered to be initialized, but 
       entries do not contain null values by default. 
 
   8)  If an I/O error occurs while reading or writing the indicated 
       file, the error will be diagnosed by routines called by this 
       routine. 
 
   9)  If any element of the column entry would be truncated when 
       assigned to an element of cvals, the error will be diagnosed 
       by routines called by this routine. 

   10) If the input column name string pointer is null, the error
       SPICE(NULLPOINTER) will be signaled.

   11) If the input column name string has length zero, the error 
       SPICE(EMPTYSTRING) will be signaled.

   12) If the output string pointer cvals is null, the error SPICE(NULLPOINTER)
       will be signaled.

   13) If the output string length indicated by lenout is less than two 
       characters, it is too short to contain one character of output data
       plus a null terminator, so it cannot be passed to the underlying Fortran
       routine.  In this event, the error SPICE(STRINGTOOSHORT) is
       signaled.
 </PRE>
<h4><a name="Files">Files</a></h4>
<PRE>
 
   See the EK Required Reading for a discussion of the EK file 
   format. 
 </PRE>
<h4><a name="Particulars">Particulars</a></h4>
<PRE>
 
   This routine is a utility that allows an EK file to be read 
   directly without using the high-level query interface. 
 </PRE>
<h4><a name="Examples">Examples</a></h4>
<PRE>
 
   1)  Read the value in the third record of the column ccol in 
       the fifth segment of an EK file designated by handle. 
 
          #include &quot;SpiceUsr.h&quot;
             .
             .
             .
          <b>ekrcec_c</b> ( handle, 4, 2, &quot;CCOL&quot;, lenout, &amp;nvals, &amp;cval, &amp;isnull );
 </PRE>
<h4><a name="Restrictions">Restrictions</a></h4>
<PRE>
 
   1) EK files open for write access are not necessarily readable. 
      In particular, a column entry can be read only if it has been 
      initialized. The caller is responsible for determining 
      when it is safe to read from files open for write access. 
 </PRE>
<h4><a name="Literature_References">Literature_References</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Author_and_Institution">Author_and_Institution</a></h4>
<PRE>
 
   N.J. Bachman   (JPL) 
 </PRE>
<h4><a name="Version">Version</a></h4>
<PRE>
   -CSPICE Version 1.1.0, 21-MAY-2001 (WLT)

       Added a cast to (char *) in the call to  F2C_ConvertStrArr to
       support compilation under C++.
   
   -CSPICE Version 1.0.0, 04-JUL-2000 (NJB)
</PRE>
<h4><a name="Index_Entries">Index_Entries</a></h4>
<PRE>
 
   read character data from EK column 
 </PRE>
<h4>Link to routine ekrcec_c source file <a href='../../../src/cspice/ekrcec_c.c'>ekrcec_c.c</a> </h4>

      </td>
    </tr>
  </tbody>
</table>

   <pre>Wed Jun  9 13:05:22 2010</pre>

</body>
</html>

